<?php
use yii\helpers\Url;
?>
<link id="bs-css" href="css/bootstrap-cerulean.min.css" rel="stylesheet">
<link href="css/charisma-app.css" rel="stylesheet">
<!-- topbar starts -->
<div class="navbar navbar-default" role="navigation">

    <div class="navbar-inner">
        <button type="button" class="navbar-toggle pull-left animated flip">
            <span class="sr-only">DuoSuTe CMS</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>

        <a class="navbar-brand" href="<?=Yii::$app->homeUrl?>"> <img alt="Charisma Logo" src="img/logo20.png" class="hidden-xs"/>
            <span>DuoSuTe</span></a>

        <!-- user dropdown starts -->
        <?php

        $menuItems[] = [
            'label' => 'Logout (' . Yii::$app->user->identity->username . ')',
            'url' => ['/site/logout'],
            'linkOptions' => ['data-method' => 'post'],
            'tag' => 'div'
        ]
        ?>
        <div class="btn-group pull-right">
            <a href="<?php echo  Yii::$app->request->hostInfo . Url::toRoute(['site/logout']);?>" data-method ="post" > <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                <i class="glyphicon glyphicon-user"></i><span class="hidden-sm hidden-xs"> <?php echo  Yii::$app->user->identity->username ;?>
                    注销</span>

            </button></a>
        <!-- user dropdown ends -->


        <ul class="collapse navbar-collapse nav navbar-nav top-menu">

            <li><a href="#"><i class="glyphicon glyphicon-home"></i> 管理首页</a></li>
            <li><a href="#"><i class="glyphicon glyphicon-globe"></i> 栏目管理</a></li>
            <li><a href="#"><i class="glyphicon glyphicon-globe"></i> 内容管理</a></li>
            <li><a href="index.php?r=user/index"><i class="glyphicon glyphicon-globe"></i>用户管理</a></li>
            <li><a href="#"><i class="glyphicon glyphicon-globe"></i> 系统设置</a></li>

        </ul>

    </div>
</div>
<!-- topbar ends -->
    <!-- 当session超时时，完全跳出frameset到登录页面 -->
